﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace RestaurantApp.Web.Infrastructure.Poco
{
    public class ErrorList
    {
        private List<string> _errors;
        private string OutPut = "";

        public List<string> Errors
        {
            get { return _errors; }
            set { _errors = value; }
        }

        public ErrorList()
        {
            Errors = new List<string>();
        }

        public MvcHtmlString Create()
        {
            foreach (var error in _errors)
            {
                OutPut += error + "<br/>";
            }
            return new MvcHtmlString(OutPut);
        }
    }
}